<template>
	<div class="body">
        <list :list="list" :loading="loading"></list>
	</div>
</template>
<script>
    import {
		mapState
    } from 'vuex'
    import list from '@/components/list/list.vue'
    import myBlogList from '@/api/blog/myBlogList.js'
	export default {
		data() {
			return {
               list:[],
               loading: true
			};
        },
        components:{
            list
        },
        computed: mapState(['userInfo']),
		methods:{
            async myBlogList (){
                let _this = this;
                let res = await myBlogList({type:'1'});//type 1  查询发布的博客
                if (res.success){
                    _this.list = res.data;
                }else {
                    // this.$message({
                    //     type: 'error',
                    //     message: res.errMsg
                    // });
                }
                _this.loading = false
            }
        },
        created() {
            this.myBlogList();
        }
	}
</script>

<style lang="scss" scoped>
    .body {
        width: 100%;
        padding-top:0;
    }
</style>
